package com.xunwulian.cmpp.util;

import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

public class IDGenerator {

    private static AtomicLong atomicLong = new AtomicLong();

    private static AtomicInteger atomicInteger = new AtomicInteger();

    // 向redis中 存储数据
    public static long incrLong() {
        return atomicLong.incrementAndGet();
    }

    public static int incrInt() {
        return atomicInteger.incrementAndGet();
    }

}
